package me.healthcare.activity;

import me.healthcare.app.R;
import me.healthcare.common.ActionBarUtils;
import me.healthcare.common.MessageAdapter;
import me.healthcare.mocktest.Doctor_Mock;
import me.healthcare.mocktest.Message_Mock;
import me.healthcare.model.Doctor;
import me.healthcare.model.Message;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class ChatActivity extends Activity {

	private TextView chat_title;
	private ListView chat_showcase;
	private EditText chat_type_edit;
	private Button chat_send_button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.doctor_screen);

		// init actionbar
		ActionBarUtils.remade(this,
				getResources().getString(R.string.activity_doctor));

		loadViews();

		chat_title.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent(
						ChatActivity.this.getApplicationContext(),
						RegisterActivity.class);
				// TODO
				ChatActivity.this.startActivity(i);
			}
		});

		chat_send_button.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO
				Toast.makeText(ChatActivity.this, "Chưa hoàn thành o(╥﹏╥)o",
						Toast.LENGTH_SHORT).show();
			}
		});

		// TODO
		Message[] message_data = Message_Mock.getMessageData(30);
		MessageAdapter adapter = new MessageAdapter(ChatActivity.this,
				R.layout.message_row, message_data);

		// listView1 = new ListView(ChatActivity.this);
		// listView1.setAdapter(adapter);
		// linear_graph.addView(listView1);

	}

	private void loadViews() {
		// chat_title = (TextView) findViewById(R.id.chat_title);
		// chat_showcase = (ListView) findViewById(R.id.chat_showcase);
		// chat_type_edit = (EditText) findViewById(R.id.chat_type_edit);
		// chat_send_button = (Button) findViewById(R.id.chat_send_button);
	}
}
